package com.doctcloud.datacloud.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.doctcloud.common.core.annotation.Excel;
import com.doctcloud.common.core.annotation.NotZero;
import lombok.*;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@EqualsAndHashCode(of = {"patientId","visitId"})
@TableName("pat_visit")
public class PatVisitEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Excel(name = "患者ID")
    @NotBlank(message = "患者ID不得为空")
    private String patientId;
    @Excel(name = "住院标识")
    @NotZero(message = "住院标识不得为空")
    private Integer visitId;
    @Excel(name = "入住科室代码")
    private String deptAdmissionTo;
    @Excel(name = "入住科室时间")
    private Date admissionDateTime;
    @Excel(name = "出科科室代码")
    private String deptDischargeFrom;
    @Excel(name = "出科时间")
    private Date dischargeDateTime;
    @Excel(name = "科主任")
    private String director;
    @Excel(name = "主治医师")
    private String attendingDoctor;
    @Excel(name = "经治医师")
    private String doctorInCharge;
    @Excel(name = "门诊医师")
    private String consultingDoctor;
    @Excel(name = "入院办理人")
    private String admittedBy;
    @Excel(name = "出院方式")
    private String dischargeDisposition;

    @Data
    public static class Key {
        private final String patientId;
        private final Integer visitId;
        public Key(String patientId, Integer visitId) {
            this.patientId = patientId;
            this.visitId = visitId;
        }
    }
}
